clear
clc
F=[565.4540 	528.0120 	565.4542 	528.0117 	561.4782 	521.4177 	561.4783 	521.4176 
562.0580 	525.5440 	562.0582 	525.5437 	563.9092 	518.0897 	563.9093 	518.0896 
561.3900 	521.4470 	561.3902 	521.4467 	567.9981 	517.4028 	567.9983 	517.4027 
563.7820 	518.1080 	563.7822 	518.1077 	571.3812 	519.8707 	571.3814 	519.8706 
567.9410 	517.4070 	567.9412 	517.4067 	572.0142 	523.9807 	572.0143 	523.9806 
571.2550 	519.8570 	571.2552 	519.8567 	569.5162 	527.3387 	569.5163 	527.3386 
571.9380 	523.9530 	571.9382 	523.9527 	565.4062 	527.9887 	565.4063 	527.9886 
569.5000 	527.3560 	569.5002 	527.3557 	562.1112 	525.5227 	562.1114 	525.5226 
565.4800 	527.7640 	565.4809 	527.7631 	561.7463 	521.4074 	561.7465 	521.4071 
562.2380 	525.3640 	562.2389 	525.3631 	564.1008 	518.2185 	564.1010 	518.2182 
561.6630 	521.4200 	561.6639 	521.4191 	568.0171 	517.5595 	568.0173 	517.5592 
564.0010 	518.2260 	564.0019 	518.2251 	571.2430 	519.9587 	571.2432 	519.9584 
567.9950 	517.5630 	567.9959 	517.5620 	571.8122 	523.9056 	571.8124 	523.9054 
571.1650 	519.9610 	571.1659 	519.9601 	569.4066 	527.1539 	569.4068 	527.1537 
571.8010 	523.9080 	571.8019 	523.9070 	565.4625 	527.7745 	565.4627 	527.7743 
569.4140 	527.1410 	569.4149 	527.1400 	562.3235 	525.3761 	562.3237 	525.3759 
565.5060 	527.5200 	565.5076 	527.5183 	562.0086 	521.3974 	562.0090 	521.3977 
562.4150 	525.1880 	562.4166 	525.1864 	564.2890 	518.3450 	564.2893 	518.3454 
561.9310 	521.3940 	561.9326 	521.3924 	568.0358 	517.7137 	568.0362 	517.7140 
564.2160 	518.3430 	564.2176 	518.3414 	571.1070 	520.0452 	571.1074 	520.0456 
568.0480 	517.7160 	568.0496 	517.7144 	571.6131 	523.8316 	571.6134 	523.8320 
571.0760 	520.0630 	571.0776 	520.0614 	569.3000 	526.9750 	569.3004 	526.9753 
571.6660 	523.8640 	571.6676 	523.8624 	565.5175 	527.5655 	565.5178 	527.5658 
569.3300 	526.9300 	569.3316 	526.9284 	562.5296 	525.2338 	562.5300 	525.2342 
565.5260 	527.3270 	565.5282 	527.3248 	562.2183 	521.3894 	562.2187 	521.3890 
562.5550 	525.0470 	562.5572 	525.0448 	564.4385 	518.4456 	564.4389 	518.4451 
562.1440 	521.3730 	562.1462 	521.3708 	568.0507 	517.8365 	568.0511 	517.8360 
564.3870 	518.4350 	564.3892 	518.4328 	570.9988 	520.1140 	570.9992 	520.1136 
568.0910 	517.8380 	568.0932 	517.8358 	571.4555 	523.7730 	571.4559 	523.7725 
571.0050 	520.1440 	571.0072 	520.1418 	569.2151 	526.8310 	569.2155 	526.8305 
571.5580 	523.8290 	571.5601 	523.8268 	565.5620 	527.3970 	565.5624 	527.3965 
569.2630 	526.7620 	569.2652 	526.7598 	562.6956 	525.1190 	562.6960 	525.1186 
565.5480 	527.1190 	565.5508 	527.1162 	562.4427 	521.3808 	562.4433 	521.3802 
562.7060 	524.8960 	562.7087 	524.8932 	564.5997 	518.5539 	564.6003 	518.5533 
562.3730 	521.3510 	562.3758 	521.3482 	568.0667 	517.9679 	568.0673 	517.9673 
564.5710 	518.5340 	564.5737 	518.5310 	570.8829 	520.1879 	570.8835 	520.1872 
568.1360 	517.9690 	568.1388 	517.9662 	571.2857 	523.7099 	571.2863 	523.7093 
570.9290 	520.2320 	570.9317 	520.2292 	569.1237 	526.6769 	569.1243 	526.6763 
571.4430 	523.7910 	571.4460 	523.7882 	565.6087 	527.2189 	565.6094 	527.2183 
569.1910 	526.5810 	569.1938 	526.5780 	562.8727 	524.9969 	562.8733 	524.9963 
565.5700 	526.9150 	565.5734 	526.9116 	562.8807 	521.3630 	562.8814 	521.3623 
562.8540 	524.7480 	562.8574 	524.7446 	564.9208 	518.8401 	564.9215 	518.8390 
562.6000 	521.3290 	562.6034 	521.3256 	568.1219 	518.3180 	568.1226 	518.3173 
564.7520 	518.6320 	564.7554 	518.6286 	570.6945 	520.3849 	570.6952 	520.3842 
568.1800 	518.0950 	568.1834 	518.0916 	571.0345 	523.6306 	571.0352 	523.6299 
570.8570 	520.3150 	570.8604 	520.3116 	568.9840 	526.2880 	568.9847 	526.2873 
571.3330 	523.7550 	571.3364 	523.7516 	565.7192 	526.7638 	565.7199 	526.7631 
569.1210 	526.4060 	569.1244 	526.4025 	563.2215 	524.6852 	563.2222 	524.6845 
565.6710 	526.6520 	565.6748 	526.6482 	563.0424 	521.3565 	563.0432 	521.3557 
563.1320 	524.5850 	563.1358 	524.5810 	565.0389 	518.9453 	565.0397 	518.9445 
562.8830 	521.3560 	562.8868 	521.3520 	568.1419 	518.4445 	568.1427 	518.4437 
564.9490 	518.8460 	564.9528 	518.8422 	570.6257 	520.4560 	570.6265 	520.4552 
568.1720 	518.3460 	568.1758 	518.3422 	570.9410 	523.6000 	570.9418 	523.5992 
570.6790 	520.4410 	570.6828 	520.4370 	568.9300 	526.1379 	568.9308 	526.1371 
571.0940 	523.6720 	571.0978 	523.6682 	565.7612 	526.5906 	565.7620 	526.5898 
568.9940 	526.1670 	568.9978 	526.1630 	563.3528 	524.5678 	563.3536 	524.5670 
565.7700 	526.3970 	565.7743 	526.3927 	563.3012 	521.3460 	563.3020 	521.3451 
563.4030 	524.4270 	563.4070 	524.4227 	565.2289 	519.1146 	565.2297 	519.1137 
563.1580 	521.3820 	563.1620 	521.3777 	568.1741 	518.6487 	568.1750 	518.6478 
565.1410 	519.0550 	565.1453 	519.0507 	570.5146 	520.5730 	570.5154 	520.5721 
568.1640 	518.5900 	568.1683 	518.5857 	570.7907 	523.5537 	570.7915 	523.5528 
570.5060 	520.5640 	570.5100 	520.5597 	568.8459 	525.9031 	568.8467 	525.9022 
570.8620 	523.5910 	570.8663 	523.5867 	565.8278 	526.3165 	565.8286 	526.3157 
568.8700 	525.9330 	568.8743 	525.9287 	563.5608 	524.3820 	563.5616 	524.3811 
565.8680 	526.1410 	565.8727 	526.1360 	563.5593 	521.3356 	563.5603 	521.3347 
563.6740 	524.2680 	563.6787 	524.2630 	565.4173 	519.2826 	565.4183 	519.2817 
563.4330 	521.4080 	563.4377 	521.4030 	568.2063 	518.8526 	568.2074 	518.8517 
565.3330 	519.2630 	565.3377 	519.2580 	570.4043 	520.6886 	570.4054 	520.6877 
568.1560 	518.8340 	568.1610 	518.8290 	570.6414 	523.5066 	570.6423 	523.5057 
570.3330 	520.6860 	570.3377 	520.6810 	568.7614 	525.6676 	568.7622 	525.6667 
570.6300 	523.5100 	570.6347 	523.5050 	565.8943 	526.0426 	565.8952 	526.0416 
568.7470 	525.7010 	568.7520 	525.6960 	563.7683 	524.1966 	563.7692 	524.1957 
565.9610 	525.9000 	565.9661 	525.8948 	563.7822 	521.3422 	563.7833 	521.3411 
563.9270 	524.1200 	563.9322 	524.1148 	565.5507 	519.3767 	565.5517 	519.3756 
563.6930 	521.4330 	563.6981 	521.4278 	568.1927 	518.9714 	568.1938 	518.9703 
565.5160 	519.4620 	565.5211 	519.4568 	570.2892 	520.7323 	570.2903 	520.7312 
568.1480 	519.0680 	568.1531 	519.0628 	570.5166 	523.4077 	570.5177 	523.4066 
570.1710 	520.8010 	570.1761 	520.7958 	568.7563 	525.4620 	568.7574 	525.4609 
570.4080 	523.4330 	570.4131 	523.4278 	566.0125 	525.8122 	566.0136 	525.8111 
568.6310 	525.4820 	568.6361 	525.4768 	563.9956 	524.0450 	563.9967 	524.0439 
566.0780 	525.6280 	566.0837 	525.6223 	564.0405 	521.3802 	564.0416 	521.3790 
564.1930 	523.9500 	564.1987 	523.9443 	565.6943 	519.5287 	565.6954 	519.5276 
563.9580 	521.4630 	563.9637 	521.4573 	568.1455 	519.1543 	568.1466 	519.1532 
565.6490 	519.6070 	565.6547 	519.6013 	570.1131 	520.8171 	570.1142 	520.8160 
568.0940 	519.2420 	568.1000 	519.2360 	570.3292 	523.3109 	570.3303 	523.3098 
570.0130 	520.8850 	570.0187 	520.8793 	568.7197 	525.2229 	568.7208 	525.2218 
570.2360 	523.3500 	570.2417 	523.3443 	566.1350 	525.5456 	566.1361 	525.5444 
568.6150 	525.2590 	568.6207 	525.2533 	564.2616 	523.8776 	564.2627 	523.8765 
566.1950 	525.3550 	566.2012 	525.3488 	564.2984 	521.4182 	564.2997 	521.4169 
564.4590 	523.7800 	564.4650 	523.7740 	565.8377 	519.6805 	565.8390 	519.6792 
564.2240 	521.4920 	564.2300 	521.4860 	568.0986 	519.3369 	568.0999 	519.3356 
565.7820 	519.7530 	565.7880 	519.7468 	569.9368 	520.9021 	569.9381 	520.9008 
568.0390 	519.4150 	568.0450 	519.4088 	570.1419 	523.2143 	570.1432 	523.2130 
569.8540 	520.9690 	569.8600 	520.9628 	568.6831 	524.9848 	568.6844 	524.9835 
570.0630 	523.2680 	570.0690 	523.2618 	566.2569 	525.2806 	566.2582 	525.2793 
568.5980 	525.0370 	568.6040 	525.0310 	564.5268 	523.7107 	564.5281 	523.7094 
566.3080 	525.0920 	566.3142 	525.0857 	564.5544 	521.4476 	564.5557 	521.4462 
564.7160 	523.6160 	564.7222 	523.6098 	565.9834 	519.8195 	565.9847 	519.8181 
564.4810 	521.5210 	564.4872 	521.5148 	568.0609 	519.5048 	568.0622 	519.5034 
565.9100 	519.8930 	565.9161 	519.8868 	569.7744 	520.9766 	569.7757 	520.9750 
567.9840 	519.5880 	567.9900 	519.5816 	569.9704 	523.1144 	569.9717 	523.1130 
569.7010 	521.0500 	569.7072 	521.0438 	568.6554 	524.7485 	568.6567 	524.7470 
569.8970 	523.1880 	569.9032 	523.1817 	566.3814 	525.0184 	566.3827 	525.0170 
568.5820 	524.8220 	568.5880 	524.8157 	564.7894 	523.5424 	564.7907 	523.5410 
];
P=[566.664741	522.7105282	566.6649707	522.7101805	566.7268041	522.7014735	566.7269181	522.7013548
566.7196032	522.668344	566.7205451	522.6674562	566.763964	522.6692942	566.7641741	522.6689947
566.7251066	522.5474854	566.7265463	522.5459168	566.8798373	522.5896155	566.8809476	522.5891489
566.7841861	522.5418216	566.7869552	522.5394603	566.8829498	522.5816831	566.8830262	522.5805209
566.824563	522.4961758	566.827267	522.4932815	566.9237686	522.5500444	566.9252064	522.5487839
566.8660307	522.4639359	566.8696053	522.4605572	567.0100817	522.4897794	567.0107413	522.4889408
566.9166678	522.4669521	566.9205503	522.4630366	567.0214421	522.482311	567.0222307	522.4816388
566.9538279	522.4505947	566.9579355	522.4463037	567.0722482	522.449441	567.0732454	522.44856
566.9897481	522.4317649	566.9946391	522.4268193	567.1256312	522.4153258	567.1263284	522.4139989
567.0267344	522.4184393	567.0317229	522.4132488	567.1797278	522.3647064	567.1816335	522.3625187
567.0564911	522.3456014	567.0620474	522.3398815	567.2555827	522.3068783	567.257516	522.3044631
567.1007311	522.3016699	567.1064981	522.2955148	567.3031922	522.2648641	567.3043501	522.2651696
567.148014	522.2614503	567.1540086	522.2552224	567.3514709	522.2190398	567.3528621	522.2174357
];
A1=F(:,[1:4]);
A2=F(:,[3:6]);
A3=F(:,[5:8]);
B1(:,1)=P(:,3)-P(:,1);
B1(:,2)=P(:,4)-P(:,2);
B2(:,1)=P(:,5)-P(:,3);
B2(:,2)=P(:,6)-P(:,4);
B3(:,1)=P(:,7)-P(:,5);
B3(:,2)=P(:,8)-P(:,6);
for m=1:8
x(m,1)=fminbnd(@(x)niuqv1(x,A1(m,:),B1(1,:)),-0.005,0.005);
end
for m=9:16
x(m,2)=fminbnd(@(x)niuqv1(x,A1(m,:),B1(2,:)),-0.005,0.005);
end
for m=17:24
x(m,3)=fminbnd(@(x)niuqv1(x,A1(m,:),B1(3,:)),-0.005,0.005);
end
for m=25:32
x(m,4)=fminbnd(@(x)niuqv1(x,A1(m,:),B1(4,:)),-0.005,0.005);
end
for m=33:40
x(m,5)=fminbnd(@(x)niuqv1(x,A1(m,:),B1(5,:)),-0.005,0.005);
end
for m=41:48
x(m,6)=fminbnd(@(x)niuqv1(x,A1(m,:),B1(6,:)),-0.005,0.005);
end
for m=49:56
x(m,7)=fminbnd(@(x)niuqv1(x,A1(m,:),B1(7,:)),-0.005,0.005);
end
for m=57:64
x(m,8)=fminbnd(@(x)niuqv1(x,A1(m,:),B1(8,:)),-0.005,0.005);
end
for m=65:72
x(m,9)=fminbnd(@(x)niuqv1(x,A1(m,:),B1(9,:)),-0.005,0.005);
end
for m=73:80
x(m,10)=fminbnd(@(x)niuqv1(x,A1(m,:),B1(10,:)),-0.005,0.005);
end
for m=81:88
x(m,11)=fminbnd(@(x)niuqv1(x,A1(m,:),B1(11,:)),-0.005,0.005);
end
for m=89:96
x(m,12)=fminbnd(@(x)niuqv1(x,A1(m,:),B1(12,:)),-0.005,0.005);
end
for m=97:104
x(m,13)=fminbnd(@(x)niuqv1(x,A1(m,:),B1(13,:)),-0.005,0.005);
end
a1(:,1)=asin(sum(x)/8);
for m=1:8
x(m,1)=fminbnd(@(x)niuqv1(x,A2(m,:),B2(1,:)),-0.005,0.005);
end
for m=9:16
x(m,2)=fminbnd(@(x)niuqv1(x,A2(m,:),B2(2,:)),-0.005,0.005);
end
for m=17:24
x(m,3)=fminbnd(@(x)niuqv1(x,A2(m,:),B2(3,:)),-0.005,0.005);
end
for m=25:32
x(m,4)=fminbnd(@(x)niuqv1(x,A2(m,:),B2(4,:)),-0.005,0.005);
end
for m=33:40
x(m,5)=fminbnd(@(x)niuqv1(x,A2(m,:),B2(5,:)),-0.005,0.005);
end
for m=41:48
x(m,6)=fminbnd(@(x)niuqv1(x,A2(m,:),B2(6,:)),-0.005,0.005);
end
for m=49:56
x(m,7)=fminbnd(@(x)niuqv1(x,A2(m,:),B2(7,:)),-0.005,0.005);
end
for m=57:64
x(m,8)=fminbnd(@(x)niuqv1(x,A2(m,:),B2(8,:)),-0.005,0.005);
end
for m=65:72
x(m,9)=fminbnd(@(x)niuqv1(x,A2(m,:),B2(9,:)),-0.005,0.005);
end
for m=73:80
x(m,10)=fminbnd(@(x)niuqv1(x,A2(m,:),B2(10,:)),-0.005,0.005);
end
for m=81:88
x(m,11)=fminbnd(@(x)niuqv1(x,A2(m,:),B2(11,:)),-0.005,0.005);
end
for m=89:96
x(m,12)=fminbnd(@(x)niuqv1(x,A2(m,:),B2(12,:)),-0.005,0.005);
end
for m=97:104
x(m,13)=fminbnd(@(x)niuqv1(x,A2(m,:),B2(13,:)),-0.005,0.005);
end
a1(:,2)=asin(sum(x)/8);
for m=1:8
x(m,1)=fminbnd(@(x)niuqv1(x,A3(m,:),B3(1,:)),-0.005,0.005);
end
for m=9:16
x(m,2)=fminbnd(@(x)niuqv1(x,A3(m,:),B3(2,:)),-0.005,0.005);
end
for m=17:24
x(m,3)=fminbnd(@(x)niuqv1(x,A3(m,:),B3(3,:)),-0.005,0.005);
end
for m=25:32
x(m,4)=fminbnd(@(x)niuqv1(x,A3(m,:),B3(4,:)),-0.005,0.005);
end
for m=33:40
x(m,5)=fminbnd(@(x)niuqv1(x,A3(m,:),B3(5,:)),-0.005,0.005);
end
for m=41:48
x(m,6)=fminbnd(@(x)niuqv1(x,A3(m,:),B3(6,:)),-0.005,0.005);
end
for m=49:56
x(m,7)=fminbnd(@(x)niuqv1(x,A3(m,:),B3(7,:)),-0.005,0.005);
end
for m=57:64
x(m,8)=fminbnd(@(x)niuqv1(x,A3(m,:),B3(8,:)),-0.005,0.005);
end
for m=65:72
x(m,9)=fminbnd(@(x)niuqv1(x,A3(m,:),B3(9,:)),-0.005,0.005);
end
for m=73:80
x(m,10)=fminbnd(@(x)niuqv1(x,A3(m,:),B3(10,:)),-0.005,0.005);
end
for m=81:88
x(m,11)=fminbnd(@(x)niuqv1(x,A3(m,:),B3(11,:)),-0.005,0.005);
end
for m=89:96
x(m,12)=fminbnd(@(x)niuqv1(x,A3(m,:),B3(12,:)),-0.005,0.005);
end
for m=97:104
x(m,13)=fminbnd(@(x)niuqv1(x,A3(m,:),B3(13,:)),-0.005,0.005);
end
a1(:,3)=asin(sum(x)/8);
